import request from '@/utils/request'



export default  {
   //医院列表  
   getHospitalList(page, limit , searchObj){
        return request({
            url:`/admin/hospital/hospital/list/${page}/${limit}`,
            method:'get',
            params: searchObj
        })
    },
    //根据dictcode查询所有子节点 （所有省）
    findByDictCode(dictCode){
        return request({
            url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
            method: 'get'
        })
    },
    //根据数据id查询子数据列表 
    dictList(id){
        return request({
            url:`/admin/cmn/dict/findChildData/${id}`,
            method:'get'
        })
    },
     //更新医院上线状态
     updateHospitalStatus(id,status){
        return request({
            url: `/admin/hospital/hospital/updateHospStatus/${id}/${status}`,
            method:'get'
        })
    },
    //查询具体某个医院的详细信息
    getHospitalById(id){
        return request({
            url: `/admin/hospital/hospital/getHospitalById/${id}`,
            method:'get'
        })
    },    
    //查看医院科室
    getDepartmentByHoscode(hoscode){
        return request({
            url: `/admin/hospital/department/getDepartmentList/${hoscode}`,
            method:'get'
        })
    }, 
    //获取排班规则
    getScheduleRule(page,limit,hoscode,depcode){
        return request({
            url: `/admin/hospital/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
            method:'get'
        })
    },
    getScheduleDetail(hoscode,depcode,workDate){
        return request({
            url: `/admin/hospital/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
            method:'get'
        })
    }
}
